package com.d.ydfactory.impl;

import com.alibaba.fastjson.JSONObject;
import com.d.ydfactory.RpcJsonParams;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class BaseImpl {

    RpcJsonParams getParams(String businessNo, Integer status, String remark, Integer adminId) {
        JSONObject rpcjson = new JSONObject();
        rpcjson.put("serial_no", businessNo);
        rpcjson.put("admin_id", adminId);
        rpcjson.put("remark", remark);
        rpcjson.put("status", status);

        RpcJsonParams rpcJsonParams = new RpcJsonParams();
        rpcJsonParams.setId(System.currentTimeMillis() + "");
        rpcJsonParams.setParams(new ArrayList<Object>() {
            {
                add(rpcjson.toString());
            }
        });
        return rpcJsonParams;
    }
}
